var moment = require("moment");


function monthEnd(date) {
    return moment(date).endOf("month").valueOf();
}

function monthStart(month, substract) {
    return moment(month).subtract(substract, 'month').startOf("month").valueOf();
}

module.exports = {
    monthEnd:monthEnd, 
    monthStart: monthStart
};